{% extends "./default.html" %}
{% import "./public/adsPannel.html" as adsPannel %}
{% block content %}

<article>
    {% if pageType != 'search' and pageType != 'tag' %}
    {% if cateInfo.sImg %}
    {% set cateImg = cateInfo.sImg %}
    {% else %}
    {% set cateImg = staticThemePath + '/images/newspic01.jpg' %}
    {% endif %}
    <h2 class="litle"><span>{{cateInfo.comments}}</span>{{cateInfo.name}}</h2>
    <div class="navtab">
        <div class="search" ms-controller="headerCtr">
            <form name="searchform" id="searchform">
                <input name="keyboard" id="keyboard" class="input_text" value="请输入关键字"
                    style="color: rgb(153, 153, 153);" onfocus="if(value=='请输入关键字'){this.style.color='#000';value=''}"
                    onblur="if(value==''){this.style.color='#999';value='请输入关键字'}" type="text" ms-on-keyup="@onKeyUp"
                    ms-duplex="@searchkey">
                <input name="show" value="title" type="hidden">
                <input name="tempid" value="1" type="hidden">
                <input name="tbname" value="news" type="hidden">
                <input name="Submit" class="input_submit" value="搜索" type="submit">
            </form>
        </div>
        <ul class="navlist" id="pageContent">
            {% set keywords = (cateInfo.keywords).split(',') %}
            {% for keyItem in keywords %}
            <li><a href="/">{{keyItem}}</a></li>
            {% endfor %}
        </ul>
        <script language="javascript">
            var obj = null;
            var As = document.getElementById('pageContent').getElementsByTagName('li');
            obj = As[0];
            for (i = 1; i < As.length; i++) {
                if (window.location.href.indexOf(As[i].href) >= 0)
                    obj = As[i];
            }
            obj.id = 'pagecurrent'
        </script>
    </div>
    {% endif %}
    <div class="newblogs">
        <h2 class="hometitle">
            {% if pageType == 'search' %}
            搜索：{{targetSearchKey}}
            {% elif pageType == 'tag' %}
            标签：{{targetTagName}}
            {% else %}
            {{cateInfo.name}}
            {% endif %}
        </h2>
        <ul>
            {% include './public/itemListTemp.html' %}
        </ul>
    </div>
    <div class="rbox">

        {% include './public/sidebar.html' %}

    </div>
</article>
{% endblock %}